﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VisualCode.Client
{
    /// <summary>
    /// Represents a reference to a type.  This is either a known .NET type
    /// or a VisualType.
    /// </summary>
    public class VisualTypeReference
    {
        public VisualTypeReference(Type netType)
        {
            if (netType == null)
                throw new ArgumentNullException("netType");

            this.NetType = netType;
            this.ReferenceType = TypeReferenceType.NETType;
        }

        public VisualTypeReference(VisualType visualType)
        {
            if (visualType == null)
                throw new ArgumentNullException("visualType");

            this.ReferenceType = TypeReferenceType.VisualType;
            this.VisualType = visualType;
        }

        public TypeReferenceType ReferenceType { get; private set; }

        public Type NetType { get; private set; }

        public VisualType VisualType { get; private set; }
    }
}
